Alarms & Events

Alarm and Event Handler

Posted by Robert Ward | 9/11/2020

Updated by Robert Ward | 6/2/2021

Updated by Robert Ward | 11/18/2022

Updated by Robert Ward | 5/10/2024

In order for the PLC to serve Alarms and Events up to the WXS, there are a few AOIs that need to be added to the logic.

Globally, there must be a single instance of “wxsAlarmEventHandler_vXX” added into the logic.

Explanation of Tags:

  • plcNewAlarmTrigger

    • Data Type: BOOL
    • Use: This tag, upon change from False to True, will execute the Handler by setting an internal Trigger bit TRUE that the WXS polls. Once True, the WXS reads plcClass, plcLocation, plcDescription, and plcDuration from this block. Upon a successful read, the WXS will set the internal Trigger bit to False.
    • This tag, plcNewAlarmTrigger, will be set to False once the data has been successfully served up to the WXS, or after a timeout of 5-seconds expires.
  • plcRecordAppend

    • Data Type: STRING
    • Use: When the PLC wishes to edit a duration field of an existing record, it can list the record ID here that was received at the time of initial record creation.
    • Note: This is supported as of 6/2/2021 in v02 of Event Spooler and v03 of the Handler
  • plcDBRecordID

    • Data Type: STRING
    • Use: Once a record is created in the DB, the WXS will return that record ID to this tag. Therefore, it can be used such that once the Trigger bit goes from True to False, copy the RecordID and set it aside for later use.
  • plcClass

    • Data Type: STRING

    • Max length of STRING to be (15)

    • Use: This serves the class (or Type) of Alarm or Event the user wishes to display on the WXS. This can be any STRING the user chooses; however, preloaded Classes are:

      • Alarm
      • Warning
      • Error
      • Comm Failure
      • Info
      • Notification
      • Lane Full
      • Jam
      • E-Stop
    • Please note, Pendant auto-separates and segregates between Alarms and Events. Therefore, they will automatically separate into Alarm tables and Event Tables. In order to satisfy this segregation, we suggest the user uses the Classes listed above. Here is the breakdown:

      • Alarms Table

        • Alarm
        • Warning
        • Error
        • Comm Failure
      • Events Table

        • Info
        • Notification
        • Lane Full
        • Jam
        • E-Stop
      • As a note, Pendant determined that any item requiring maintenance or facilities intervention, shall show up on the Alarms table, and any item other item be considered an Event.

    • plcLocation

      • Data Type: STRING
      • Max length of STRING to be (25)
      • Use: User can use this to segregate sections of a system for filtering purposes in the WXS. E.g. Inbound, Outbound, Processing, Returns, etc.
    • plcDescription

      • Data Type: STRING
      • Max length of STRING to be (35)
      • Use: User uses this field to describe the Alarm or Event and perhaps even the remedy path.
      • 11.18.2022 UPDATE - add an Array into the tag table called "wxsEventDescriptions" were each element is a STRING. Then, load all of your Event Description texts into this array. The WXS needs to consume this tag for the Notifications Manager.
    • plcDuration

      • Data Type: STRING
      • Use: User to load the Alarm or Event Duration into the WXS via String. E.g. 500ms, 4s, 2m, etc.

Once the Handler has been added and configured, the user can now add the wxsEventSpooler_vXX AOI throughout the program using one instance for each Alarm/Event the user wishes to queue for the AlarmEventHandler to serve up to the WXS.

Explanation of Tags:

  • bitEventTrigger

    • Data Type: BOOL
    • Use: This bit is set True when the users alarm/event bit is true. The user must return this bit to false once the alarm/event conditions have cleared, as the AOI will not do that.
  • bitGlobalEventLatch

    • Data Type: BOOL
    • Use: This is a global bit that should be common between every program instance of the wxsEventSpooler AOI. This bit allows multiple events to occur at the exact same time and allows the Spooler to queue them and only serve one event at a time without risking overlooking the other alarms/events.
    • This tag should be the same tag as plcNewAlarmTrigger on the wxsAlarmEventHandler.
  • EventRecordID

    • Data Type: STRING
    • Use: This tag is the returned record ID of where the alarm/event was stored in the WXS DB table.
  • plcDBRecordID

    • Data Type: STRING
    • Use: This tag must be the same tag as the wxsAlarmEventHandler_vXX plcDBRecordID tag
  • strEventClass

    • Data Type: STRING
    • Use: This tag is likely a is the class type constant that the user wants copied into the Class field in the WXS table. I.e. if this Spooler is being used to serve an “Alarm” then the static text in this tag should be “Alarm”
  • plcClass

    • Data Type: STRING
    • Use: This must be the same tag as plcClass in the wxsAlarmEventHander_vXX AOI
  • strEventLocation

    • Data Type: STRING
    • Use: User can use this to segregate sections of a system for filtering purposes in the WXS. E.g. Inbound, Outbound, Processing, Returns, etc.
  • plcLocation

    • Data Type: STRING
    • Use: This must be the same tag as plcLocation in the wxsAlarmEventHander_vXX AOI
  • strEventDescription

    • Data Type: STRING
    • Use: User uses this field to describe the Alarm or Event and perhaps even the remedy path.
    • 11.18.2022 UPDATE - add an Array into the tag table called "wxsEventDescriptions" were each element is a STRING. Then, load all of your Event Description texts into this array. The WXS needs to consume this tag for the Notifications Manager.
  • plcDescription

    • Data Type: STRING
    • Use: This must be the same tag as plcDescription in the wxsAlarmEventHander_vXX AOI

This KB Article has accompanying downloads. Please reach out to your rep.

This Handler/Article now has a UDT for download